Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
小
@qumu 参考之前的问题,需要做一下转换才能发布
在 如何在ROS2的环境下使用Pcl_ros以及pcl 功能包 中说:
#include "pcl_conversions/pcl_conversions.h" pcl::PointCloudpcl::PointXYZRGB::Ptr cloud; sensor_msgs::msg::PointCloud2 msg; pcl::toROSMsg(*cloud, msg); cloud_publisher->publish(msg);
#include "pcl_conversions/pcl_conversions.h"
pcl::PointCloudpcl::PointXYZRGB::Ptr cloud; sensor_msgs::msg::PointCloud2 msg;
pcl::toROSMsg(*cloud, msg); cloud_publisher->publish(msg);